package com.brand.data.model;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.annotation.JSONField;
import com.brand.data.util.StringUtil;

import lombok.Data;

/**
 * @author scl.BlueOcean
 * @version 1.0
 * @date 2018年03月27 15:58
 * @description
 */
@Data
public class ResultData {
    private String lastTime="";
    private String mileage="";
    private String type="";
    private String vin="";
    private List<Detail> details = new ArrayList<>();
    private List<Material> materials = new ArrayList<>();
    
    public void setLastTime(String lastTime){
    	try {
			this.lastTime = StringUtil.formatDateStr(lastTime);
		} catch (Exception e) {
			this.lastTime = lastTime;
		}
    }
    public void setMileage(String mileage){
    	if (mileage != null) {
			this.mileage = mileage.trim();
		}
    }
    @JSONField(serialize = false)
    private RequestParam detailParam;
    @Data
	public class Detail{
        private String content="";
        private String type="";
		public Detail(String content, String type) {
			this.content = content;
			this.type = type;
		}
    }
    @Data
    public class Material{
        private String content="";
        private String type="";
		public Material(String content, String type) {
			this.content = content;
			this.type = type;
		}
    }
}
